function Stu(name, age, gender) {
    this.name = name
    this.age = age
    this.gender = gender
    this.say = function () {
        console.log(`hello i am ${this.name} and ${this.age} years old`)
    }
    
}

function Stua(name, age, gender) {
    this.name = name
    this.age = age
    this.gender = gender
    Stua.prototype.say = function () {
        console.log(`hello i am ${this.name} and ${this.age} years old`)
    }
}

const s1 = new Stu('王尼玛', 20, '男')
const s2 = new Stu('苍老师', 23, '女')
const sa2 = new Stua('苍老师', 23, '女')


class Stu1 {
    constructor(name, age, gender) {
        this.name = name
        this.age = age
        this.gender = gender
    }
    say() {
        console.log(`hello i am ${this.name} and ${this.age} years old`)
    }
    hello() {
        console.log('hello')
    }
}
const s11 = new Stu1('王尼玛', 20, '男')
const s12 = new Stu1('苍老师', 23, '女')